package com.kaikeba.t31.service.impl;

import com.kaikeba.t31.admin.po.AdminRoleMenu;
import com.kaikeba.t31.core.service.impl.CrudServiceImpl;
import com.kaikeba.t31.dao.AdminRoleMenuMapper;
import com.kaikeba.t31.service.AdminRoleMenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author yumingzhi
 * @since 2021-11-15
 */
@Service
public class AdminRoleMenuServiceImpl extends CrudServiceImpl<AdminRoleMenu> implements AdminRoleMenuService {

    @Resource
    private AdminRoleMenuMapper adminRoleMenuMapper;

    @Override
    public void deleteByRole(Long roleId) {
        adminRoleMenuMapper.deleteByRole(roleId);
    }
    @Override
    public boolean saveBatch(List<AdminRoleMenu> entityList) {
        return adminRoleMenuMapper.saveBatch(entityList);
    }

    @Override
    public List<AdminRoleMenu> getMenuByRoleId(Long roleId) {
        return adminRoleMenuMapper.getMenuByRoleId(roleId);
    }

    @Override
    public List<AdminRoleMenu> getMenuByRoleIdList(List<Long> roleIds) {
        return adminRoleMenuMapper.getMenuByRoleIdList(roleIds);
    }

}
